{  Statement: http://acmp.ru/?main=task&id_task=499
   Verdict: Accepted
}
uses
    SysUtils, Math;

var
    n,w:longint;
    a,b:array[1..3] of longint;
    i,j,k:boolean;

procedure put(i, j, k:boolean);

var
    tn,tw:longint;

begin
tn := 0;
tw := 0;
if i then begin
    inc(tn, a[1]);
    inc(tw, b[1]);
end;
if j then begin
    inc(tn, a[2]);
    inc(tw, b[2]);
end;
if k then begin
    inc(tn, a[3]);
    inc(tw, b[3]);
end;
if (tn <= w) and (tw >= n) then begin
    write('YES');
    halt(0);
end;
end;

begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n, w, a[1], b[1], a[2], b[2], a[3], b[3]);
for i := false to true do
    for j := false to true do
        for k := false to true do
            put(i, j, k);
write('NO');
end.